import 'package:flutter_yfree/YFree.dart';
import 'package:flutter_yfree/main/YFree+Model.dart';

class UserModel {
  UserModel();

  late String sign;
  late String name;
  late String avatar;
  late String yim_user;
  late String yim_token;

  UserModel.fromJson(Map<dynamic, dynamic> map) {
    sign = map.byString("sign", defaultValue: "")!;
    name = map.byString("name", defaultValue: "")!;
    avatar = map.byString("avatar", defaultValue: "")!;
    yim_user = map.byString("yim_user", defaultValue: "")!;
    yim_token = map.byString("yim_token", defaultValue: "")!;
  }

  String toJson() => yToJson({
        "sign": sign,
        "name": name,
        "avatar": avatar,
        "yim_user": yim_user,
        "yim_token": yim_token,
      });
}
